<template>
	<block>
		<view v-for="k in knowledge">
			<view>
				  <text>{{k.title}}</text>
			</view>
			<text>{{k.content}}</text>
		</view>
	</block>
</template>

<script>
	export default {
		data() {
			return {
				knowledge:{}
			}
		},
		created() {
			this.queryKnowledge();
		},
		methods: {
			queryKnowledge(){
				uni.request({
				    url: 'http://127.0.0.1:8004/mentalhealth/knowledge/queryKnowledge', //仅为示例，并非真实接口地址。
				    success: (res) => {
				        this.knowledge = res.data.data;
						console.log(this.knowledge)
				    }
				});
			}
		}
	}
</script>

<style>

</style>
